<template>
    <div class="content">
        <div class="top pc">
            <div class="item" v-for="(item, index) in topData" :key="index">
                <img :src="item.img" alt="">
                <p>{{ item.titile }}</p>
            </div>
        </div>
        <div class="centenr pc">
            <div class="left">
                <img src="../assets/bottom_19.png" alt="">
                <p>版权所属：山东三江医疗科技有限公司
                </p>
            </div>
            <div class="center">
                <p>联系方式:</p>
                <p>7*24服务热线: {{ webXinxi.tel1 }}</p>
                <p>咨询热线: {{ webXinxi.tel2 }}</p>
                <p>咨询热线: {{ webXinxi.tel3 }}</p>
                <p>邮箱: {{ webXinxi.email }}</p>
                <p>地址: {{ webXinxi.dizhi }}</p>
            </div>
            <div class="right">
                <img v-if="webXinxi?.weixinimg" :src="base64Img(webXinxi?.weixinimg)" alt="">
                <p>咨询微信</p>
            </div>
        </div>
        <div class="bottom">
            <a href="https://beian.miit.gov.cn/">鲁ICP备16019787号-1</a>
            <a href="http://www.beian.gov.cn/portal/registerSystemInfo?recordcode=37079402000720">鲁公网安备
                37079402000720号</a>
        </div>
    </div>
</template>

<script setup>
import { ref, onMounted } from 'vue'
import { getWebXinxi } from '../api/api/ProducView'
import { base64Img } from '../tools/tools.js'

const topData = [
    {
        img: new URL('@/assets/bottom/1.png', import.meta.url).href,
        titile: '24小时服务响应'
    }, {
        img: new URL('@/assets/bottom/2.png', import.meta.url).href,
        titile: '365天优质售后服务'
    }, {
        img: new URL('@/assets/bottom/3.png', import.meta.url).href,
        titile: '承诺质保两年'
    }, {
        img: new URL('@/assets/bottom/4.png', import.meta.url).href,
        titile: '量身定制解决方案'
    },
]

const webXinxi = ref({})


const _getWebXinxi = () => {
    getWebXinxi(1).then((res) => {
        console.log('网站信息获取', res);
        webXinxi.value = res.data.data
    })
}


onMounted(() => {
    _getWebXinxi()
});

</script>

<style lang="scss" scoped>
// 取消显示手机端 显示pc端
@media (min-width: 800px) {
    .content {
        background-color: rgb(43, 55, 61);
        display: flex;
        flex-direction: column;

        .top {
            width: 1200px;
            margin: 0 auto;
            display: flex;
            justify-content: space-around;
            padding: 20px 0;

            img {
                margin-right: 20px;
            }

            .item {
                display: flex;
                line-height: 60px;
                color: white;
            }

            border-bottom: 1px solid rgb(65, 75, 81);
        }

        .centenr {
            width: 1200px;
            margin: 0 auto;
            margin-top: 20px;
            display: flex;

            .left {
                color: rgb(129, 145, 153);
                padding-right: 10px;
                border-right: 1px solid rgb(65, 75, 81);
                margin-right: 26px;

            }

            .center {
                color: rgb(129, 145, 153);
                text-align: center;
                margin-right: 20px;

            }

            .right {
                border-left: 1px solid #414b51;
                margin-left: 20px;
                padding-left: 20px;

                img {
                    width: 120px;

                }

                p {
                    text-align: center;
                    color: #819199;
                }
            }

            margin-bottom: 20px;
        }

        .bottom {
            width: 1200px;
            margin: 0 auto;
            border-top: 1px solid #414b51;
            padding: 20px 0 20px;
            text-align: center;
            color: #73818a;
        }
    }
}

// 取消显示pc端 显示手机端
@media screen and (max-width: 799px) {
    .pc {
        display: none;
    }
    .bottom {
        padding: 40px 0;
        background-color: #2b373d;
        text-align: center;
        color: #819199;
    }
}
</style>